var UserInfoService = require(__dirname+'/../../models/UserInfoService');
var BrandService = require(__dirname+'/../../models/BrandService');


exports.Index:function(req, res, next){
    var id = req.query["id"];
    console.log(id);
    // console.log(app.req.param('id'));

    if(typeof id == 'undefined' || !id){
      res.send("empty");
    }else{
      UserInfoService.getRow(id,function(err,result){
        if(err){
          console.log(err);
        }else{
          console.log(result);
          var id = result[0]['id'];
          BrandService.getRow(id,function(err1,result1){
            if(err1){
              console.log(err1);
            }else{
              console.log(result1);
              res.send(result1);
            }
          })
        }
      })    
    }
}
